#include "river.h"

River::River(QPixmap pixmap, QGraphicsScene *scene, QObject *parent)
    : QObject(parent), QGraphicsPixmapItem(pixmap,0,scene)
{
    setAcceptHoverEvents(true);
}

void River::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
    event->accept();
}

void River::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
    emit clicked();
}

void River::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
    emit hoverChanged(true);
}

void River::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
    emit hoverChanged(false);
}

void River::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    //QGraphicsPixmapItem::paint(painter,option,widget);
}
